package com.fun.fun.httpclient;

import com.fun.frame.SourceCode;
import com.fun.httpclient.ClientManage;

/**
 * 从连接池中回收连接的多线程类
 */
public class GCThread extends Thread {
    /**
     * 线程结束标志
     */
    private static boolean FLAG = true;

    @Override
    public void run() {
        while (FLAG) {
            SourceCode.sleep(1);
            ClientManage.recyclingConnection();
        }
    }

    /**
     * 结束线程方法
     */
    public static void stopThread() {
        FLAG = false;
    }
}